<template>
<div>
    <div class="conshow">
        <div class="showheader">
            <div class="showh">
                <div>
                    <Tag checkable color="blue" v-for="item in obj.tags" 
                    :key="item._id" >{{item.title}}</Tag>
                </div>
                <div>
                    <span class="tag_1 bor_r1">
                        <i>关注者</i><b>{{obj.praisenumber}}</b>
                    </span>
                    <span  class="tag_1">
                        <i>被浏览</i><b>{{obj.amount}}</b>
                    </span>
                </div>
            </div>
            <h1>{{obj.title}}</h1>
            <div class="showtool">
                <Button type="primary" >关注问题</Button>
                <Button type="info"><Icon type="edit"></Icon>写回答</Button>
                <span>
                    <Icon type="chatbubble"></Icon>&nbsp;{{obj.commentnumber}}&nbsp;条评论
                </span>
                <span>
                    <Icon type="android-wifi"></Icon>&nbsp;分享
                </span>
                <span>
                    <Icon type="android-favorite-outline"></Icon>&nbsp;感谢
                </span>
                <span>
                    <Icon type="star"></Icon>&nbsp;收藏
                </span>
            </div>
        </div>
    </div>
    <div class="context">
        <Row :gutter="15">
            <Col span="18">
                <div class="usercon">
                    <p><img src="~assets/images/t.jpg" alt=""><span>{{obj.userid.name}}</span></p>
                    <p>{{obj.commentnumber}} 人赞同了该回答</p>
                    <div class="textp" v-html="obj.text">
                       
                    </div>
                    <p class="edit">
                        编辑于 {{obj.time}}
                    </p>
                    <div class="itemfoot">
                        <span><i class="ivu-icon ivu-icon-chatbubble"></i>&nbsp;{{obj.commentnumber}}&nbsp;条评论
                        </span><span><i class="ivu-icon ivu-icon-android-wifi"></i>&nbsp;分享
                        </span><span><i class="ivu-icon ivu-icon-android-favorite-outline"></i>&nbsp;感谢
                        </span><span><i class="ivu-icon ivu-icon-star"></i>&nbsp;收藏
                        </span>
                    </div>
                </div>
                
                <div class="more">
                    查看全部 155 个回答
                </div>
            </Col>
            <Col span="6">
                <box-userinfo :data="obj.userid"></box-userinfo>
            </Col>
        </Row>
    </div>
</div>
</template>
<script>
import axios from "../../tools/axios";
export default {
    async asyncData({ store, params,error,env }){
       
        var t= await axios.post('/new/list/'+params.id);
       
        return {obj:t.data,env:env,id:params.id};
    },created(){
        //this.id=this.$route.params.id;
        console.log(this.obj);
    }
}
</script>
